Failed to create a function SOLVED - Mailing list pgsql-novice

From Roy MacGregor Paterson
Subject Failed to create a function SOLVED
Date
Msg-id p06010201bbf34cb5ac1a@[192.168.1.102]
Whole thread Raw
In response to Failed to create a function  (Roy MacGregor Paterson <roy@macgregortech.com>)
Responses Re: Failed to create a function SOLVED
List pgsql-novice
Thanks to all who helped out on this problem.

RTFM and trial by Kafka-esque error are truly wonderful things.

One of the problems I was having with creating functions was the
strange behaviour of psql (responding with a list of command options
for every line pasted) when I was copying and pasting them from
BBEdit files, like this snippet...

webdav=# CREATE FUNCTION trigger_WDVolume () RETURNS opaque AS '
webdav'# DECLARE
webdav'#
ABORT     BEGIN     COMMENT   CREATE    DROP      GRANT     LOAD
NOTIFY    REVOKE    SET       UNLISTEN
ALTER     CLOSE     COMMIT    DECLARE   EXPLAIN   INSERT    LOCK
REINDEX   ROLLBACK  SHOW      UPDATE
ANALYZE   CLUSTER   COPY      DELETE    FETCH     LISTEN    MOVE
RESET     SELECT    TRUNCATE  VACUUM
webdav'# -- set the default disk space
webdav'#
ABORT     BEGIN     COMMENT   CREATE    DROP      GRANT     LOAD
NOTIFY    REVOKE    SET       UNLISTEN
ALTER     CLOSE     COMMIT    DECLARE   EXPLAIN   INSERT    LOCK
REINDEX   ROLLBACK  SHOW      UPDATE
ANALYZE   CLUSTER   COPY      DELETE    FETCH     LISTEN    MOVE
RESET     SELECT    TRUNCATE  VACUUM

...it turns out that, despite comments about psql being quite happy
with all whitespace, it's not: it doesn't like tab chars (in PG 7.3.3
on Mac OS X at least). Convert tabs to 2xspaces and all is
tickety-boo.

Roy
--
--------------------
Roy MacGregor Paterson
MacGregorTech

t: +44 (0) 20 7584 7891
f: +44 (0) 20 7589 6223
m: +44 (0) 7803 163 938
w: www.macgregortech.com
e: roy@macgregortech.com
--------------------

pgsql-novice by date:

Previous
From: Roy MacGregor Paterson
Date:
Subject: Environment variables SOLVED
Next
From: Roy MacGregor Paterson
Date:
Subject: Postmaster running, psql not SOLVED